package com.bright.ghj.stats;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication(scanBasePackages = {"com.bright.ghj.common", "com.bright.ghj.user", "com.bright.ghj.stats"})
@EnableCaching
@EnableTransactionManagement
public class GhjStatsApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(GhjStatsApplication.class, args);
    }

//    @Bean
//    public RestTemplate restTemplate(){
//        return new RestTemplate();
//    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(GhjStatsApplication.class);
    }
}
